package week5;
import java.util.Scanner;
public class PalindromeNumber {
    public static void main(String[]args){
        Scanner scanner=new Scanner(System.in);
        System.out.print("请输入一个整数：");
        int num=scanner.nextInt();
        int originalNum=num;
        int reverseNum=0;
        while (num>0){
            int digit =num %10;
            reverseNum=reverseNum*10+digit;
            num=num/10;
        }
        if (originalNum==reverseNum){
            System.out.println(originalNum+"是回文数");
            }
        else{
            System.out.println(originalNum+"不是回文数");
        }scanner.close();
    }
}
